package tech.yingchuan.blogs.controller.front;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import tech.yingchuan.blogs.common.BizCodeType;
import tech.yingchuan.blogs.service.impl.SequenceService;

/**
 * 前台页面入口
 * @author Ycdr
 * @version 1.0
 * @date 2018年6月22日
 */
@Controller
public class FrontHomeController {

    @Autowired
    private SequenceService  sequenceService;
    @RequestMapping("/front/index.html")
    public String frontHome(){
        return "front/index";
    }

    @RequestMapping("/TradeId")
    @ResponseBody
    public String getNumber(){
        return sequenceService.generate(BizCodeType.TYPE_ROLE_USER);
    }
}
